package cn.xinyangtong.facade.pojo;

import cn.xinyangtong.pojo.TbItem;

import java.io.Serializable;

public class Item extends TbItem implements Serializable {

	public Item() {}

	public Item(TbItem tbItem) {
		setBarcode(tbItem.getBarcode());
		setCid(tbItem.getCid());
		setCreated(tbItem.getCreated());
		setId(tbItem.getId());
		setImage(tbItem.getImage());
		setNum(tbItem.getNum());
		setPrice(tbItem.getPrice());
		setSellPoint(tbItem.getSellPoint());
		setStatus(tbItem.getStatus());
		setTitle(tbItem.getTitle());
		setUpdated(tbItem.getUpdated());
	}

	private transient String[] images;
	
	//解决多张图片问题
	public String[] getImages() {
		if(getImage()!=null) {
			images = getImage().split(",");
			return images;
		}
		return null;
	}

}
